package com.xiaoluo.common.utils;

import org.codehaus.jackson.map.ObjectMapper;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

/**
 * Project : XL-Spider
 * Package : com.xiaoluo.common.utils
 * Created by Willian.
 * Date  : 2015/10/26 12:33.
 */
public class RedisUtils {
    public static JedisPool jedisPool = null;

    private final static String AGENT_PHONE_PREFIX="agent:phone:";

    private final static String COMPARE_LIST_PREFIX="compare:list:";

    private final static String COMPARE_COUNT_KEY="compare:count";

    private final static String PRODUCT_COOKIE_KEY="product:cookie";

    private final static ObjectMapper mapper = new ObjectMapper();

    public static String getCookie(){
        String  cookie = "";

        Jedis jedis = jedisPool.getResource();
        cookie = jedis.get(PRODUCT_COOKIE_KEY);
        jedis.close();

        return cookie;
    }

}
